//
//  ImagePickerView.h
//  PickerManager
//
//  Created by iOS开发 on 2018/8/14.
//  Copyright © 2018年 iOS开发. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol ImagePickerViewDelegate <NSObject>
// 添加图片
- (void)pushToPicker;
// 查看图片
- (void)checkImageWithIndex:(NSIndexPath *)index withPhotos:(NSMutableArray *)photos;
@end

@interface ImageCollectionCell : UICollectionViewCell
@property (nonatomic, strong) UIImageView *imageView;
@end

@interface ImagePickerView : UIView

/**
 初始化

 @param frame 尺寸
 @param horizontalCount 一行的图片个数
 @return view
 */
- (instancetype)initWithFrame:(CGRect)frame AndHorizontalCount:(NSUInteger)horizontalCount;

/**
 获取cell的位置

 @param index indexPath
 @param view 相对哪个View的位置
 @return 位置
 */
- (CGRect)getCellPositionWithIndex:(NSIndexPath *)index inView:(UIView *)view;


@property (nonatomic, weak) id<ImagePickerViewDelegate>delegate;

// 最大显示图片数 默认9
@property (nonatomic, assign) NSInteger maxCount;

// 更新图片
- (void)updatePhotos:(NSArray *)imageArray;
// 添加拍摄图片
- (void)addCameraImage:(UIImage *)image;

@end
